package com.harry.rabbitmqhello;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Harry
 * @date 2018/3/30 14:50
 */

@Component
public class Receiver {

    @RabbitListener(queues = "topic.message")
    public void process1(String hello){
        System.out.println("Receiver>>>>>>>>>>1 : " + hello);
    }
    @RabbitListener(queues = RabbitConfig.messages)
    public void process2(String hello){
        System.out.println("Receiver>>>>>>>>>>2 : " + hello);
    }
    @RabbitListener(queues = "topic.queue_name_was")
    public void process3(String hello){
        System.out.println("Receiver>>>>>>>>>>3 : " + hello);
    }
    @RabbitListener(queues = "topic.qnw")
    public void process4(String hello){
        System.out.println("Receiver>>>>>>>>>>4 : " + hello);
    }
}
